<template>
    <div class="eee">
        <div class="rrr">
            <el-button type="danger" round @click="batchdelefun">批量删除</el-button>
        </div>
        <div class="ttt">
            <el-pagination
                @current-change="handleCurrentChange"
                :current-page="currentPage4"
                :page-sizes="[10, 15, 20, 25]"
                :page-size="10"
                :total="100"
                layout="prev, pager, next, jumper"
            ></el-pagination>
        </div>
    </div>
</template>

<script>
import eventBus from '@/utils/eventBus'
export default {
    props: {
        //分页
        page: {
            default() { return 1 }
        },
        pageSize: {
            default() { return 10 }, type: Number
        },
        total: {
            default() { return 0 },
            type: Number
        },
        pageSizes: {
            default() { return [10, 20, 30, 40, 50, 60, 70, 80, 90, 100] }, type: Array()
        },
    },
    data() {
        return {
            currentPage4: 1,
        }
    },

    methods: {
        //分页-控制每页显示数量
        // handleSizeChange(val) {
        //   console.log(`每页 ${val} 条`);
        //   this.$emit('changepageSize', val)
        // },
        //分页-控制当前第几页
        handleCurrentChange(val) {
            console.log(`当前页: ${val}`);
            this.$emit('changePage', val)
        },



        //批量删除
        batchdelefun() {
            eventBus.$emit('batchdelete')

        }
    }
}
</script>

<style>
</style>